﻿<phone:PhoneApplicationPage
    x:Class="BackgroundAudio.Sample.WP7.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    Loaded="MainPage_OnLoaded"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <TextBlock x:Name="ApplicationTitle" Grid.Row="0" Margin="5,5,5,5" Text="Streaming Media Background Audio"
                   Style="{StaticResource PhoneTextNormalStyle}" />

        <TextBlock x:Name="txtTrack" Grid.Row="1" Height="Auto" Margin="5,5,5,5" Text="Title" VerticalAlignment="Top"
                   Width="Auto" />

        <TextBlock x:Name="txtTitle" Grid.Row="2" Height="Auto" Margin="5,5,5,5" VerticalAlignment="Top" Width="Auto" />

        <Grid Grid.Row="3" />

        <Grid Grid.Row="4" Margin="5,5,5,5">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <ProgressBar Grid.ColumnSpan="3" x:Name="positionIndicator" VerticalAlignment="Top" Width="Auto" />
            <TextBlock Grid.Row="1" Height="Auto" HorizontalAlignment="Left" Name="textPosition" Text="00:00:00"
                       VerticalAlignment="Top" />
            <TextBlock Grid.Row="1" Grid.Column="2" Height="Auto" HorizontalAlignment="Right" Name="textRemaining"
                       Text="-00:00:00" VerticalAlignment="Top" />
        </Grid>
        <TextBlock Grid.Row="5" Height="Auto" Margin="5,5,5,5" HorizontalAlignment="Left" x:Name="txtState"
                   Text="State: N/A" VerticalAlignment="Top" Width="438" />
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" x:Name="AppBar">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.rew.rest.png" Text="previous"
                                            Click="prevButton_Click" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.play.rest.png" Text="play"
                                            Click="playButton_Click" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.pause.rest.png" Text="pause"
                                            Click="pauseButton_Click" IsEnabled="False" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.ff.rest.png" Text="next"
                                            Click="nextButton_Click" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>